#include <iostream>
#include <string>
#include <algorithm>

using namespace std;
string addLargeNumbers(const string& num1, const string& num2) {
    int len1 = num1.size(), len2 = num2.size();
    int i = len1 - 1, j = len2 - 1, carry = 0;
    string result;
    
    while (i >= 0 || j >= 0 || carry > 0) {
        int digit1 = i >= 0 ? num1[i--] - '0' : 0;
        int digit2 = j >= 0 ? num2[j--] - '0' : 0;
        int sum = digit1 + digit2 + carry;
        result.push_back((sum % 10) + '0');
        carry = sum / 10;
    }
    
    reverse(result.begin(), result.end());
    return result;
}

int main() {
    string num1, num2;
    cout << "请输入第一个超长的非负整数：";
    cin >> num1;
    cout << "请输入第二个超长的非负整数：";
    cin >> num2;
    
    string sum = addLargeNumbers(num1, num2);
    cout << "它们的和是：" << sum << endl;
    return 0;
}